1. Field of the Invention
The present invention relates generally to databases and, more specifically, to query optimizers.
2. Description of the Background Art
Computer databases have become a prevalent means for data storage and retrieval. A database user will commonly access the underlying data in a database using a Database Management System (“DBMS”). A user issues a query to the DBMS that conforms to a defined query language. This simplifies the user's interactions with the database by not requiring that the user know or understand the underlying structure of the physical database. Because of this, however, it is imperative that the DBMS execute the query in a manner which is most efficient for the underlying database.
DBMSs commonly include query optimizers in order to determine the most efficient way to execute a query. Effective design of the query optimizer is critical to producing an efficient DBMS.
The query optimizer analyzes the query and produces an access plan. This includes, for example, choosing the access method for each table accessed, choosing the order in which to perform a join operation on the tables, and choosing the join method to be used in each join operation. As there are typically many strategies for executing a given query using combinations of these operations, the optimizer will generate and evaluate a number of strategies from which to select the best one by way of an enumeration process (or “search space generation process”). Further discussion of optimizer strategies is provided in commonly-owned U.S. Pat. No. 7,184,998, issued Feb. 27, 2007, which is herein incorporated by reference in its entirety.
While developing enhancements to the query optimizer, it is difficult to determine why the particular access plan was ultimately chosen. Since this information is helpful in order to refine this critical component for maximal performance, a query optimizer architect needs to be aware of how the optimizer is responding to various scenarios. Accordingly, what is desired is a means to visualize the performance of the query optimizer and to compare optimization logs obtained in different scenarios.